Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1.2K
Visualizações
Azure Kubernetes Error when running "az aks get-credentials" command

Azure Admins created a cluster for us. On VM I installed "az cli" and "kubectl". With my account from Azure Portal I can see that Kubernetes Service and Resource Group to which it belongs. From the level of that cluster in Azure Portal I can see that I have a role:

"AKS Cluster Admin Operator"

I am logged on VM with kubectl with my account. I need to config my kubectl to work with our cluster. When I try to execute:

az aks get-credentials --resource-group FRONT-AKS-NA2 --name front-aks

I am getting error:

ForbiddenError: The client 'my_name@my_comp.COM' with object id '4ea46ad637c6' does not have authorization to perform action 'Microsoft.ContainerService/managedClusters/listClusterUserCredential/action' over scope '/subscriptions/89e05d73-8862-4007-a700-0f895fc0f7ea/resourceGroups/FRONT-AKS-NA2/providers/Microsoft.ContainerService/managedClusters/front-aks' or the scope is invalid. If access was recently granted, please refresh your credentials.

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

Well, I see the comment, and you already get the solution. So I just can explain the difference to you. Hope it will help you!

When you use the command az aks get-credentials without parameter --admin, it means the CLI command uses the default value: Cluster user. And when you use the cluster user, it just works if you integrate AKS with the AAD. But you said you just have the AKS Cluster Admin Operator role, so the appropriate parameter is --admin. You can get more details here.

And on my side, it's a little dangerous. If the AKS cluster is just for the test, there is no problem. But if it's for production, I recommend you integrate with the AAD, and then give the appropriate permissions to the user. Because the admin user means you have all the permissions, you know, it's not safe.

over 4 years ago · Santiago Trujillo Relatório

0

In my case to refresh recently granted credentials helped this one:

az account set --subscription "your current subscription name"

It led to re-login and fix the issue.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda